package com.example.wzh.robotsdemo;

import android.app.Application;
import android.content.Intent;
import android.util.Log;

import com.efrobot.library.OnInitUnLinkListener;
import com.efrobot.library.RobotManager;
import com.efrobot.library.speechsdk.SpeechManager;
import com.zhy.http.okhttp.OkHttpUtils;

import java.util.concurrent.TimeUnit;

import okhttp3.OkHttpClient;


public class MyApplication2 extends Application{

    private  String DevId = "568968854";
    private  String AccessKey = "96810824";
    private  String AccessSecret = "Jp4rt6x47IEl6M18f053U00G49TIjQ2D";


    @Override
    public void onCreate() {
        super.onCreate();
//        new LoginJZY(this);



        SpeechManager.getInstance().init(this, AccessKey, AccessSecret, DevId, new OnInitUnLinkListener() {
                    @Override
                    public void onInitComplete(RobotManager.ResultCode resultCode) {
                        Log.e("TAG","初始化成功" + resultCode);
                    }
                });

            OkHttpClient okHttpClient = new OkHttpClient.Builder()
//                .addInterceptor(new LoggerInterceptor("TAG"))
                    .connectTimeout(10000L, TimeUnit.MILLISECONDS)
                    .readTimeout(10000L, TimeUnit.MILLISECONDS)
                    //其他配置
                    .build();

            OkHttpUtils.initClient(okHttpClient);



        }
    private void startMyServer() {
        Intent startIntent = new Intent(this, MyService.class);
        startService(startIntent);
    }
}
